﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Services;

using RaidAssist.DataAccess;

namespace RaidAssist.WebServices
{
    /// <summary>
    /// Contains the web services for the RaidAssist application
    /// </summary>
    [WebService(Namespace = "http://webservices.raidassist.co.uk")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    public class Default : System.Web.Services.WebService
    {
        /// <summary>
        /// Creates a new user
        /// </summary>
        /// <param name="username">The username</param>
        /// <param name="passwordHash">The hash of their password</param>
        /// <param name="displayName">The display name for the new user</param>
        /// <param name="emailAddress">The email address for the new user</param>
        [WebMethod]
        public void CreateUser(string username,
                               string passwordHash,
                               string displayName,
                               string emailAddress)
        {
            new DBInterface().CreateUser(username,
                                         passwordHash,
                                         displayName,
                                         emailAddress);
        }
    }
}
